from api import AppLogin

class Login:
    # 获取accessionToken和idtoken

    def getAPPToken(self):
        globalToken = AppLogin.Login().AuthLogin().json().get('access_token')
        data= AppLogin.Login().APPLogin(globalToken).json().get('data')
        accessToken = data.get('accessToken')
        idToken = data.get('idToken')
        Authorization = 'Bearer ' + accessToken

        return Authorization,idToken

if __name__ == '__main__':
    accessToken,idToken =Login().getAPPToken()
    print(idToken)
    print('*'* 30)
    print(accessToken)